// MyAAbs 
// Template returns the absolute value of a number without using built in functions.
// By DreamVB 11:21 19/10/2016

#include <iostream>
#include <string>

using namespace std;
using std::cout;
using std::endl;

//Template start
template <class T> T MyAAbs(T a);
template<class T> T MyAAbs(T a){
	if (a < 0){
		return -a;
	}
	return a;
}
//Template ccode end

int main(int argc, char *argv[]){
	//Test MyAAbs function
	cout << MyAAbs(12) << endl;
	cout << MyAAbs(-8) << endl;
	cout << MyAAbs(-2.5) << endl;
	cout << MyAAbs(8.6) << endl;
	cout << MyAAbs(0) << endl;
	cout << MyAAbs(-1) << endl;
	
	system("pause");
	return 0;
}